package cn.yuanqiao.web.controller.archive.wenjianzhengli;

import cn.yuanqiao.archive.wenjianzhengli.service.IZaixianjieshouService;
import cn.yuanqiao.common.web.controller.BaseController;
import cn.yuanqiao.common.core.domain.AjaxResult;
import cn.yuanqiao.common.annotation.Log;
import cn.yuanqiao.common.enums.BusinessType;

import com.alibaba.fastjson2.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/archive/zxjs")
public class ZaixianjieshouController extends BaseController {

    @Autowired
    private IZaixianjieshouService zaixianjieshouService;

    /**
     * 组卷
     * @return
     */
    @Log(title = "组卷", businessType = BusinessType.INSERT)
    @PreAuthorize("@ss.hasPermi('archive:zxjs:mergeYqda')")
    @PostMapping("/mergeYqda")
    public AjaxResult mergeYqda(@RequestBody JSONObject object){
        logger.info(object.toJSONString());
        zaixianjieshouService.mergeYqda(object);
        return AjaxResult.success();
    }
}
